From: Jonas Dreßler Date: Sun, 28 Jun 2020 20:28:57 +0000 (+0200) Subject: inhibitShortcutsDialog: Enable line wrapping for additional label X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~684^2^2~196 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=73f8c1c482e15f84909b26325b6df5bb51a73da0;p=gnome-shell.git inhibitShortcutsDialog: Enable line wrapping for additional label The inhibitShortcutsDialog can show an additional label which explains how to restore shortcuts. This label is not managed by the MessageDialogContent, so we need to enable line wrapping and disable ellipsization ourselves. Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2616 https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1336 --- diff --git a/js/ui/inhibitShortcutsDialog.js b/js/ui/inhibitShortcutsDialog.js index 14731daa5..ac86eea49 100644 --- a/js/ui/inhibitShortcutsDialog.js +++ b/js/ui/inhibitShortcutsDialog.js @@ -1,5 +1,5 @@ /* exported InhibitShortcutsDialog */ -const { Clutter, Gio, GLib, GObject, Gtk, Meta, Shell, St } = imports.gi; +const { Clutter, Gio, GLib, GObject, Gtk, Meta, Pango, Shell, St } = imports.gi; const Dialog = imports.ui.dialog; const ModalDialog = imports.ui.modalDialog; @@ -90,6 +90,8 @@ var InhibitShortcutsDialog = GObject.registerClass({ text: _('You can restore shortcuts by pressing %s.').format(restoreAccel), style_class: 'message-dialog-description', }); + restoreLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE; + restoreLabel.clutter_text.line_wrap = true; content.add_child(restoreLabel); }